<?php
/**
 * Created by PhpStorm.
 * User: fangwei
 * Date: 2019-07-03
 * Time: 22:44
 */

namespace App\Http\Controllers\Admin\View;


use App\Http\Controllers\Controller;
use App\Http\Repositories\Services\ICompany;

class CompanyController extends Controller
{
    protected $companyService;
    public function __construct(ICompany $companyService)
    {
        $this->companyService = $companyService;
    }

    public function index(){
        return view('admin.company.index');
    }

    public function store(){
        return view('admin.company.create');
    }

    public function update($id){
        $dao = $this->companyService->byId($id);
        return view('admin.company.edit',['dao'=>$dao]);
    }

}